﻿<%@ WebHandler Language="C#" Class="GetReview" %>

using System;
using System.Web;
using fanfu.Business;

public class GetReview : IHttpHandler {

    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";
        string ParentId = HttpContext.Current.Request.Params["ParentId"].ToString();
        string ParentType = HttpContext.Current.Request.Params["ParentType"].ToString();
        context.Response.Write(SelectReview(ParentId, ParentType));
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }
    
    public string SelectReview(string ParentId, string ParentType)
    {
        return new ReviewRule().CreateReviewListHtml(ParentId, int.Parse(ParentType)).ToString();
    }

}